package cn.edu.abtu.controller;

import cn.edu.abtu.component.MsmComponent;
import cn.edu.abtu.service.MsmService;
import cn.edu.abtu.vo.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Locale;
import java.util.Random;

@CrossOrigin
@RestController
@RequestMapping("/edumsm/msm")
public class MsmController {

    @Autowired
    private MsmService msmService;

    @Autowired
    private MsmComponent msmComponent;

    @GetMapping("/send/{phone}")
    public ResponseData sendCode(@PathVariable String phone){
        return msmService.sendCode(phone);
    }

}
